<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: tic_tac_toe Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tic_tac_toe Namespace Reference<div class="ingroups"><a class="el" href="group__examplecontract.html">Example Contract</a> &raquo; <a class="el" href="group__tictactoecontract.html">Tic Tac Toe Contract</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtic__tac__toe_1_1_close.html">Close</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Action to close new game.  <a href="structtic__tac__toe_1_1_close.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtic__tac__toe_1_1_create.html">Create</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Action to create new game.  <a href="structtic__tac__toe_1_1_create.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtic__tac__toe_1_1_move.html">Move</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Action to make movement.  <a href="structtic__tac__toe_1_1_move.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtic__tac__toe_1_1_movement.html">Movement</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data structure for movement.  <a href="structtic__tac__toe_1_1_movement.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtic__tac__toe_1_1_restart.html">Restart</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Action to restart new game.  <a href="structtic__tac__toe_1_1_restart.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:aacac68d559d9ed27aec1ffdfc489c5bb"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#aacac68d559d9ed27aec1ffdfc489c5bb">Games</a> = <a class="el" href="struct_table.html">Table</a>&lt; <a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(tic.tac.toe), <a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(tic.tac.toe), <a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(games), Game, <a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> &gt;</td></tr>
<tr class="memdesc:aacac68d559d9ed27aec1ffdfc489c5bb"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="struct_table.html">Table</a> to store list of games.  <a href="#aacac68d559d9ed27aec1ffdfc489c5bb">More...</a><br /></td></tr>
<tr class="separator:aacac68d559d9ed27aec1ffdfc489c5bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6f32b76cb96a584daeacd2fd81de47d2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a6f32b76cb96a584daeacd2fd81de47d2">is_empty_cell</a> (const <a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> &amp;cell)</td></tr>
<tr class="memdesc:a6f32b76cb96a584daeacd2fd81de47d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if cell is empty.  <a href="#a6f32b76cb96a584daeacd2fd81de47d2">More...</a><br /></td></tr>
<tr class="separator:a6f32b76cb96a584daeacd2fd81de47d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba689bbd2f10a5bf4fc47223b3d095d0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#aba689bbd2f10a5bf4fc47223b3d095d0">is_valid_movement</a> (const <a class="el" href="structtic__tac__toe_1_1_movement.html">Movement</a> &amp;movement, const Game &amp;game)</td></tr>
<tr class="memdesc:aba689bbd2f10a5bf4fc47223b3d095d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check for valid movement  <a class="el" href="structtic__tac__toe_1_1_movement.html" title="Data structure for movement. ">Movement</a> is considered valid if it is inside the board and done on empty cell.  <a href="#aba689bbd2f10a5bf4fc47223b3d095d0">More...</a><br /></td></tr>
<tr class="separator:aba689bbd2f10a5bf4fc47223b3d095d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89acc0b533e41467c0892037df57eb84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a89acc0b533e41467c0892037df57eb84">get_winner</a> (const Game &amp;game)</td></tr>
<tr class="memdesc:a89acc0b533e41467c0892037df57eb84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get winner of the game  Winner of the game is the first player who made three consecutive aligned movement.  <a href="#a89acc0b533e41467c0892037df57eb84">More...</a><br /></td></tr>
<tr class="separator:a89acc0b533e41467c0892037df57eb84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1e8569a3c97387d0110438153a49eee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#ad1e8569a3c97387d0110438153a49eee">apply_create</a> (const <a class="el" href="structtic__tac__toe_1_1_create.html">Create</a> &amp;create)</td></tr>
<tr class="memdesc:ad1e8569a3c97387d0110438153a49eee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply create action.  <a href="#ad1e8569a3c97387d0110438153a49eee">More...</a><br /></td></tr>
<tr class="separator:ad1e8569a3c97387d0110438153a49eee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e195fe601cf3880aca48b2248735182"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a0e195fe601cf3880aca48b2248735182">apply_restart</a> (const <a class="el" href="structtic__tac__toe_1_1_restart.html">Restart</a> &amp;restart)</td></tr>
<tr class="memdesc:a0e195fe601cf3880aca48b2248735182"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply restart action.  <a href="#a0e195fe601cf3880aca48b2248735182">More...</a><br /></td></tr>
<tr class="separator:a0e195fe601cf3880aca48b2248735182"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a919ad3e56865f814ef7dbc69945bd9ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a919ad3e56865f814ef7dbc69945bd9ea">apply_close</a> (const <a class="el" href="structtic__tac__toe_1_1_close.html">Close</a> &amp;close)</td></tr>
<tr class="memdesc:a919ad3e56865f814ef7dbc69945bd9ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply close action.  <a href="#a919ad3e56865f814ef7dbc69945bd9ea">More...</a><br /></td></tr>
<tr class="separator:a919ad3e56865f814ef7dbc69945bd9ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a050580fbf3f79ecc05187598689ba4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a9a050580fbf3f79ecc05187598689ba4">apply_move</a> (const <a class="el" href="structtic__tac__toe_1_1_move.html">Move</a> &amp;move)</td></tr>
<tr class="memdesc:a9a050580fbf3f79ecc05187598689ba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply move action.  <a href="#a9a050580fbf3f79ecc05187598689ba4">More...</a><br /></td></tr>
<tr class="separator:a9a050580fbf3f79ecc05187598689ba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeaedf4d3b735ca89b99a8aab82841a97"><td class="memItemLeft" align="right" valign="top">struct&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#aeaedf4d3b735ca89b99a8aab82841a97">PACKED</a> (Game)</td></tr>
<tr class="memdesc:aeaedf4d3b735ca89b99a8aab82841a97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data structure to hold game information.  <a href="#aeaedf4d3b735ca89b99a8aab82841a97">More...</a><br /></td></tr>
<tr class="separator:aeaedf4d3b735ca89b99a8aab82841a97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="aacac68d559d9ed27aec1ffdfc489c5bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="namespacetic__tac__toe.html#aacac68d559d9ed27aec1ffdfc489c5bb">tic_tac_toe::Games</a> = typedef <a class="el" href="struct_table.html">Table</a>&lt;<a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(tic.tac.toe),<a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(tic.tac.toe),<a class="el" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(games),Game,<a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a919ad3e56865f814ef7dbc69945bd9ea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tic_tac_toe::apply_close </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structtic__tac__toe_1_1_close.html">Close</a> &amp;&#160;</td>
          <td class="paramname"><em>close</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">close</td><td>- action to be applied </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad1e8569a3c97387d0110438153a49eee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tic_tac_toe::apply_create </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structtic__tac__toe_1_1_create.html">Create</a> &amp;&#160;</td>
          <td class="paramname"><em>create</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">create</td><td>- action to be applied </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9a050580fbf3f79ecc05187598689ba4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tic_tac_toe::apply_move </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structtic__tac__toe_1_1_move.html">Move</a> &amp;&#160;</td>
          <td class="paramname"><em>move</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">move</td><td>- action to be applied </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0e195fe601cf3880aca48b2248735182"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tic_tac_toe::apply_restart </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structtic__tac__toe_1_1_restart.html">Restart</a> &amp;&#160;</td>
          <td class="paramname"><em>restart</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">restart</td><td>- action to be applied </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a89acc0b533e41467c0892037df57eb84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> tic_tac_toe::get_winner </td>
          <td>(</td>
          <td class="paramtype">const Game &amp;&#160;</td>
          <td class="paramname"><em>game</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">game</td><td>- the game which we want to determine the winner of </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>winner of the game (can be either none/ draw/ account name of host/ account name of challenger) </dd></dl>

</div>
</div>
<a class="anchor" id="a6f32b76cb96a584daeacd2fd81de47d2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool tic_tac_toe::is_empty_cell </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> &amp;&#160;</td>
          <td class="paramname"><em>cell</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cell</td><td>- value of the cell (should be either 0, 1, or 2) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if cell is empty </dd></dl>

</div>
</div>
<a class="anchor" id="aba689bbd2f10a5bf4fc47223b3d095d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool tic_tac_toe::is_valid_movement </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structtic__tac__toe_1_1_movement.html">Movement</a> &amp;&#160;</td>
          <td class="paramname"><em>movement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Game &amp;&#160;</td>
          <td class="paramname"><em>game</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">movement</td><td>- the movement made by the player </td></tr>
    <tr><td class="paramname">game</td><td>- the game on which the movement is being made </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if movement is valid </dd></dl>

</div>
</div>
<a class="anchor" id="aeaedf4d3b735ca89b99a8aab82841a97"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct tic_tac_toe::PACKED </td>
          <td>(</td>
          <td class="paramtype">Game&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
